package com.test.aop.controller;

import com.test.aop.config.MyAOP;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/u")
public class UserController {

    @MyAOP
    @RequestMapping("/u1")
    public String u1() {
        log.info("执行目标方法u1");
        return "u1";
    }

    @RequestMapping("/u2")
    public String u2() {
        log.info("执行目标方法u2");
        //int a = 0/0;
        return "u2";
    }
}
